#include <iostream>
using namespace std;
#include <iomanip>
using std::setw;
#include <cmath>

double find_max(double a[],int n);
double find_min(double a[],int n);
double find_ave(double a[],int n);

int main()
{
	int n;
	cin >> n;
	double a[n];
	double max,min,ave;

	for(int i=0;i<n;i++)
	{
		cin >> a[i];
	}
	max=find_max(a,n);
	min=find_min(a,n);
	ave=find_ave(a,n);
	cout << " max= " << max<< "\n";
	cout << " min= " << min<< "\n";
	cout << " ave= " << ave<< "\n";
}

double find_max( double arr[],int n)
{
	double max=arr[0];
	for (int i=0 ;i<n;i++)
	{
		if(max<arr[i]) max=arr[i]; 
	}
	return max;
}

double find_min( double arr[],int n)
{
	double min=arr[0];
	for (int i=0 ;i<n;i++)
	{
		if(min>arr[i]) min=arr[i]; 
	}
	return min;
}

double find_ave(double arr[],int n)
{
	double sum=0;
	double ave;
	for (int i=0 ;i<n;i++)
	{
		sum=sum+arr[i];
	}
	ave=sum/n;
	return ave;
}
